home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Tele / D-F / ExpressModemCCLs.sit / Express Modem / Express Modem 2400 / Express Modem 2400
Encoding:
Text File  |  1993-03-30  |  3.5 KB  |  213 lines  |  [mlts/slnk]

  1. ! "Express Modem AppleTalk Remote Access Script - 12/10/92 - V1.0"
  2. @ORIGINATE
  3. @ANSWER
  4. !
  5. @LABEL 1
  6. !
  7. ! first recall the factory configuration
  8. !
  9. matchclr
  10. settries 0
  11. matchstr 1 3 "OK\13\10"
  12. @LABEL 2
  13. write "AT&F\13"
  14. matchread 30
  15. inctries
  16. iftries 2 59
  17. jump 2
  18. !
  19. ! Next, Set up the configuration: Echo off
  20. !
  21. @LABEL 3
  22. matchstr 1 4 "OK\13\10"
  23. write "ATE0\13"
  24. matchread 30
  25. jump 59
  26. !
  27. ! Next, turn off error control
  28. !
  29. @LABEL 4
  30. matchstr 1 5 "OK\13\10"
  31. matchstr 2 5 "ERROR\13\10"
  32. write "AT&Q0S37=6\13"
  33. matchread 30
  34. !
  35. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  36. !
  37. @LABEL 5
  38. matchclr
  39. ifstr 2 8 "1"
  40. matchstr 1 8 "OK\13\10"
  41. write "ATM0\13"
  42. matchread 30
  43. jump 59
  44. !
  45. ! The modem is ready.  So enable answering, or originate a call
  46. !
  47. @LABEL 8
  48. ifANSWER 30
  49. note "Dialing ^1" 3
  50. write "ATS0=0DT^1\13"
  51. !
  52. @LABEL 9
  53. matchstr 1 11 "CONNECT 1200\13\10"
  54. matchstr 2 12 "CONNECT 2400\13\10"
  55. matchstr 3 13 "CONNECT 4800\13\10"
  56. matchstr 4 14 "CONNECT 7200\13\10"
  57. matchstr 5 15 "CONNECT 9600\13\10"
  58. matchstr 6 16 "CONNECT 12000\13\10"
  59. matchstr 7 17 "CONNECT 14400\13\10"
  60. matchstr 8 50 "NO CARRIER\13\10"
  61. matchstr 9 50 "ERROR\13\10"
  62. matchstr 10 52 "NO DIALTONE\13\10"
  63. matchstr 11 51 "MODEM IN USE\13\10"
  64. matchstr 12 53 "BUSY\13\10"
  65. matchstr 13 54 "NO ANSWER\13\10"
  66. matchread 700
  67. jump 59
  68. !
  69. @LABEL 11
  70. note "Communicating at 1200 bps." 2
  71. CommunicatingAt 1200
  72. jump 18
  73. !
  74. @LABEL 12
  75. note "Communicating at 2400 bps." 2
  76. CommunicatingAt 2400
  77. jump 18
  78. !
  79. @LABEL 13
  80. note "Communicating at 4800 bps." 2
  81. CommunicatingAt 4800
  82. jump 18
  83. !
  84. @LABEL 14
  85. note "Communicating at 7200 bps." 2
  86. CommunicatingAt 7200
  87. jump 18
  88. !
  89. @LABEL 15
  90. note "Communicating at 9600 bps." 2
  91. CommunicatingAt 9600
  92. jump 18
  93. !
  94. @LABEL 16
  95. note "Communicating at 12.0 kbps." 2
  96. CommunicatingAt 12000
  97. jump 18
  98. !
  99. @LABEL 17
  100. note "Communicating at 14.4 kbps." 2
  101. CommunicatingAt 14400
  102. !
  103. @LABEL 18
  104. ifANSWER 19
  105. pause 30
  106. exit 0
  107. @LABEL 19
  108. userhook 1
  109. exit 0
  110. !
  111. ! @ANSWER
  112. ! Set up the modem to answer
  113. @LABEL 30
  114. write "ATS0=1\13"
  115. matchstr 1 31 "OK\13\10"
  116. matchread 30
  117. jump 59
  118. !
  119. @LABEL 31
  120. matchstr 1  32 "RING\13\10"
  121. matchstr 2  11 "CONNECT 1200\13\10"
  122. matchstr 3  12 "CONNECT 2400\13\10"
  123. matchstr 4  13 "CONNECT 4800\13\10"
  124. matchstr 5  14 "CONNECT 7200\13\10"
  125. matchstr 6  15 "CONNECT 9600\13\10"
  126. matchstr 7  16 "CONNECT 12000\13\10"
  127. matchstr 8  17 "CONNECT 14400\13\10"
  128. matchstr 9  50 "NO CARRIER\13\10"
  129. matchstr 10 50 "ERROR\13\10"
  130. matchstr 11 51 "MODEM IN USE\13\10"
  131. matchstr 12 52 "NO DIALTONE\13\10"
  132. matchstr 13 53 "BUSY\13\10"
  133. matchstr 14 54 "NO ANSWER\13\10"
  134. matchread 700
  135. jump 31
  136. !
  137. @LABEL 32
  138. note "Answering phone…" 2
  139. jump 31
  140. !
  141. ! 50: error messages
  142. !
  143. @LABEL 50
  144. exit -6021
  145. !
  146. @LABEL 51
  147. note "The Express Modem is currently in use by another application…" 2
  148. exit -6020
  149. !
  150. @LABEL 52
  151. exit -6020
  152. !
  153. @LABEL 53
  154. exit -6022
  155. !
  156. @LABEL 54
  157. exit -6023
  158. !
  159. @LABEL 59
  160. exit -6019
  161. !
  162. ! Hang up the modem
  163. !
  164. @HANGUP
  165. @LABEL 60
  166. settries 0
  167. @LABEL 61
  168. write "ATH0\13"
  169. matchclr
  170. matchstr 1 64 "OK\13\10"
  171. matchstr 2 63 "NO CARRIER\13\10"
  172. matchstr 3 64 "ERROR\13\10"
  173. matchread 15
  174. inctries
  175. iftries 3 64
  176. ! no response, try escape sequence
  177. write "+++"
  178. matchclr
  179. matchstr 1 62 "OK\13\10"
  180. matchread 18
  181. !
  182. ! No response from modem
  183. !
  184. jump 61
  185. !
  186. @LABEL 62
  187. matchclr
  188. matchstr 1 64 "OK\13\10"
  189. matchstr 2 63 "NO CARRIER\13\10"
  190. write "ATH0\13"
  191. matchread 50
  192. jump 61
  193. !
  194. @LABEL 63
  195. pause 45
  196. flush
  197. !
  198. ! Recall the factory settings
  199. !
  200. @LABEL 64
  201. matchclr
  202. matchstr 1 65 "OK\13\10"
  203. write "AT&F\13"
  204. matchread 30
  205. !
  206. @LABEL 65
  207. matchstr 1 66 "OK\13\10"
  208. write "ATS0=0\13"
  209. matchread 30
  210. !
  211. @LABEL 66
  212. exit 0
  213.  ÙgD0 NgTˆgPˆgLˆgHˆgDˆg@0$ˇg:`:4Ë%V¿DJg*(^;f~`28NëJgæ~ª>‡-/ (n2^*(nˇ¸N^NuNVHÁ(.M|*<¿K